package com.eportal.action;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 智能锁二维码的跳转地址，为降低二维码的复杂性，使用了/a
 * 为了方便用户跳转
 * @author wangk
 *
 */
public class AServlet extends HttpServlet{
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String p = req.getParameter("p");
		String c = req.getParameter("c");
		req.getSession().setAttribute("register_add_pid", p);
		req.getSession().setAttribute("register_add_checkcode", c);
		req.getRequestDispatcher("/admin/loginByApp.action").forward(req, resp);
		return;
	}

}
